import request from '@/utils/request'

export function deviceList({ size, current, ...data }) {
  return request({
    url: '/v1/device/query/page',
    method: 'post',
    params: { size, current },
    data
  })
}

export function addDevice(data) {
  return request({
    url: '/v1/device/add',
    method: 'post',
    data
  })
}

export function updateDevice(data) {
  return request({
    url: '/v1/device/update',
    method: 'post',
    data
  })
}

export function syncDevice(data) {
  return request({
    url: '/v1/device/sync',
    method: 'post',
    data
  })
}

export function syncUsetToDevice(data) {
  return request({
    url: '/v1/device/syncUserInfoToDevice',
    method: 'post',
    data
  })
}

export function syncAllUserInfo(data) {
  return request({
    url: '/v1/device/syncAllUserInfo',
    method: 'post',
    data
  })
}

export function getInfo(params) {
  return request({
    url: '/v1/device/getInfo',
    method: 'post',
    params
  })
}

export function queryDeviceUser(params) {
  return request({
    url: '/v1/device/queryDeviceUser',
    method: 'post',
    params
  })
}
